<template>
  <div class="container">
    <swiper  class="swiper" autoplay interval="4000" indicator-dots>
      <swiper-item class="item" v-for="value in motto">
        <img :src="value.img_url"/>  
      </swiper-item>
    </swiper>
  </div>
</template>

<script>
export default {
  data () {
    return {
      motto: []
    }
  },
  created () {
    var _this=this;
    wx.request({
      url:'https://daka.rzkeji.com/api/daka/get-banner-list',
      header: {
      'content-type': 'application/json' // 默认值
      },
      success:function(res){
        var bannerImg=res.data.data;
        for(var i=0;i<bannerImg.length;i++)
        {
          _this.motto.push({
            "id":bannerImg[i].id,
            "img_url":bannerImg[i].img_url
        })
        }
       
      }
    })
  }
}
</script>

<style scoped>
.item img{width: 100%;height: 175px}
.swiper{height: 175px;}
</style>
